package com.urbanflow.vinci.main;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

public class EnumJour {
	public static final String LUNDI = "lu";
	public static final String MARDI = "ma";
	public static final String MERCREDI = "me";
	public static final String JEUDI = "je";
	public static final String VENDREDI = "ve";
	public static final String SAMEDI = "sa";
	public static final String DIMANCHE = "di";
	private static EnumJour singleton = new EnumJour();
	
	public static EnumJour getInstance(){
		return singleton;
	}
	
	public List<String> listJours(){
		List<String> jours = new ArrayList<String>();
		jours.add(LUNDI);
		jours.add(MARDI);
		jours.add(MERCREDI);
		jours.add(JEUDI);
		jours.add(VENDREDI);
		jours.add(SAMEDI);
		jours.add(DIMANCHE);
		return jours;
	}
	
	public String convertNombreEnJour(Integer nb){
		switch(nb){
		case Calendar.MONDAY:
			return LUNDI;
		case Calendar.TUESDAY:
			return MARDI;
		case Calendar.WEDNESDAY:
			return MERCREDI;
		case Calendar.THURSDAY:
			return JEUDI;
		case Calendar.FRIDAY:
			return VENDREDI;
		case Calendar.SATURDAY:
			return SAMEDI;
		case Calendar.SUNDAY:
			return DIMANCHE;
		default:
			return null;
		}
	}
}
